package com.leo.blog.service;

import com.leo.blog.dto.VisitExecution;
import com.leo.blog.entity.Visit;
import com.leo.blog.exceptions.VisitOperationException;

public interface VisitService {
	VisitExecution addVisit(Visit visit) throws VisitOperationException;
	VisitExecution addSelective(Visit visit) throws VisitOperationException;
	
	VisitExecution deleteVisitById(int visitId);
	
	VisitExecution updateVisit(Visit visit);
	VisitExecution updateVisitSelect(Visit visit);
	
	VisitExecution getVisitById(int visitId);
	VisitExecution getVisitByIp(String visitIp);
	VisitExecution getVisitByTimesCount(Visit visit);//long
	
	/**
	 * 模糊查询分组查询
	 */
	VisitExecution getVisitListByPage(Visit visitCondition, int pageIndex, int pageSize);
	//VisitExecution queryVisitListByPageCount(Visit visitCondition);
	
	/**
	 * 模糊查询,分组显示
	 * @param visitCondition
	 * @param rowIndex
	 * @param pageSize
	 * @return
	 */
	VisitExecution getVisitListByGroupIp(Visit visitCondition, int pageIndex, int pageSize);
	//VisitExecution queryVisitListByGroupIpCount(Visit visitCondition);
	/**
	 * 根据日期分组查询
	 * @param visitCondition
	 * @param rowIndex
	 * @param pageSize
	 * @return
	 */
	VisitExecution getVisitListByDate(Visit visitCondition);
	/**
	 * 根据IP分组查询
	 * @param visitCondition
	 * @return
	 */
	VisitExecution getVisitListByIp();
}
